<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="text-css.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>

<body>
<div  class="box" style="display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;
">
    <h1>云端资源服务</h1>
    <p>更新时间：2018-12-21 13:28:08</p>
    <h1><a name="API-service-add-1">1.云端资源服务</a></h1>
    <p>云端资源服务为云端管理的基础服务，通过该服务获取IoT云端资源的令牌，后续请求通过该令牌访问资源。</p>
    <ul style="margin:0">
        <li>获取云端资源token</li>
        <li>刷新云端资源token</li>
    </ul>
    <h2><a name="API-service-add-1-1">1.1失效机制</a></h2>
    <ul style="margin:0">
        <li>cloudToken的有效时间通过expireIn来返回，默认有效时长为7200秒（2小时）。</li>
    </ul>
    <h1><a name="API-service-add-2">2.获取云端资源token</a></h1>
    <h2><a name="API-service-add-2-1">2.1定义描述</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:20%">path</th><th style="width:10%">方法</th><th style="width:70%">描述</th></tr>
        <tr><td>/api/token</td><td>get</td><td>获取云端资源Token；</td></tr>
    </table>
    <h2><a name="API-service-add-2-2">2.2请求参数</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:15%">参数</th><th style="width:10%">类型</th><th style="width:10%">必填</th><th style="width:65%">描述</th></tr>

    </table>

    <h2><a name="API-service-add-2-3">2.3返回参数</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:40%">参数</th><th style="width:20%">类型</th><th style="width:40%">描述</th></tr>
        <tr><td>token</td><td>String</td><td>云端Token</td></tr>
        <tr><td>expiresIn</td><td>long</td><td>Token有效期(单位:s)
        </td></tr>
    </table>

    <h2><a name="API-service-add-2-4">2.4示例</a></h2>
    <h3>请求示例</h3>
    <pre class="pre-box">

 {


}       
    </pre>
    <h3>正常返回示例</h3>
    <pre class="pre-box">

{

             "date": "success",
             "code": 200,
             "message": "success",
             "data": {
                "Token" : "token",
                "expiresIn" : 7200
                      }
}        
    </pre>
    <h2><a name="API-service-add-2-5">2.5错误码</a></h2>
    <p><a href="wrong-diction.html">请参考公共错误码</a></p>


    <h1><a name="API-service-add-3">3.刷新云端资源token</a></h1>

    <h2><a name="API-service-add-3-1">3.1定义描述</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:20%">path</th><th style="width:10%">方法</th><th style="width:70%">描述</th></tr>
        <tr><td>/api/token</td><td>put</td><td>获取云端资源Token；</td></tr>
    </table>
    <h2><a name="API-service-add-3-2">3.2请求参数</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:15%">参数</th><th style="width:10%">类型</th><th style="width:10%">必填</th><th style="width:65%">描述</th></tr>
        <tr><td>token</td><td>String</td><td>是</td><td>云端Token</td></tr>
    </table>

    <h2><a name="API-service-add-3-3">3.3返回参数</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:40%">参数</th><th style="width:20%">类型</th><th style="width:40%">描述</th></tr>
        <tr><td>token</td><td>String</td><td>云端Token</td></tr>
        <tr><td>expiresIn</td><td>long</td><td>Token有效期(单位:s)
        </td></tr>
    </table>

    <h2><a name="API-service-add-3-4">3.4示例</a></h2>
    <h3>请求示例</h3>
    <pre class="pre-box">
 请求头
     {
        "token":"token"
    }
    </pre>
    <h3>正常返回示例</h3>
    <pre class="pre-box">

{

             "date": "success",
             "code": 200,
             "message": "success",
             "data": {
                "Token" : "token",
                "expiresIn" : 7200
                      }
}        
    </pre>
    <h2><a name="API-service-add-3-5">3.5错误码</a></h2>
    <p><a href="wrong-diction.html">请参考公共错误码</a></p>

    <h1><a name="API-service-add-4">4.给设备下发tts文本</a></h1>
    <h2><a name="API-service-add-4-1">4.1定义描述</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:20%">path</th><th style="width:10%">方法</th><th style="width:70%">描述</th></tr>
        <tr><td>/api/device/tts</td><td>post</td><td>给设备下发tts文本</td></tr>
    </table>
    <h2><a name="API-service-add-4-2">4.2请求参数</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:15%">参数</th><th style="width:10%">类型</th><th style="width:10%">必填</th><th style="width:65%">描述</th></tr>
        <tr><td>token</td><td>String</td><td>是</td><td>云端Token</td></tr>
        <tr><td>deviceKey</td><td>String</td><td>是</td><td>设备key</td></tr>
        <tr><td>text</td><td>String</td><td>是</td><td>文本</td></tr>
    </table>

    <h2><a name="API-service-add-4-3">4.3返回参数</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:40%">参数</th><th style="width:20%">类型</th><th style="width:40%">描述</th></tr>
        <tr><td>token</td><td>String</td><td>云端Token</td></tr>
        <tr><td>expiresIn</td><td>long</td><td>Token有效期(单位:s)
        </td></tr>
    </table>

    <h2><a name="API-service-add-4-4">4.4示例</a></h2>
    <h3>请求示例</h3>
    <pre class="pre-box">
     请求头
        {
            "token":"token"
         }
     请求体
        {
            "deviceKey":"deviceKey";
            "text":"文本";
        }
    </pre>
    <h3>正常返回示例</h3>
    <pre class="pre-box">

{

             "date": "success",
             "code": 200,
             "message": "success",
             "data": {}
}
    </pre>
    <h2><a name="API-service-add-4-5">4.5错误码</a></h2>
    <p><a href="wrong-diction.html">请参考公共错误码</a></p>


    <h1><a name="API-service-add-5">5.给设备下发音频文件</a></h1>
    <h2><a name="API-service-add-5-1">5.1定义描述</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:20%">path</th><th style="width:10%">方法</th><th style="width:70%">描述</th></tr>
        <tr><td>/api/device/file</td><td>post</td><td>给设备下发音频文件</td></tr>
    </table>
    <h2><a name="API-service-add-5-2">5.2请求参数</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:15%">参数</th><th style="width:10%">类型</th><th style="width:10%">必填</th><th style="width:65%">描述</th></tr>
        <tr><td>token</td><td>String</td><td>是</td><td>云端Token</td></tr>
        <tr><td>deviceKey</td><td>String</td><td>是</td><td>设备key</td></tr>
        <tr><td>file</td><td>String</td><td>是</td><td>文件</td></tr>
    </table>

    <h2><a name="API-service-add-5-3">5.3返回参数</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:40%">参数</th><th style="width:20%">类型</th><th style="width:40%">描述</th></tr>
        <tr><td>token</td><td>String</td><td>云端Token</td></tr>
        <tr><td>expiresIn</td><td>long</td><td>Token有效期(单位:s)
        </td></tr>
    </table>

    <h2><a name="API-service-add-5-4">5.4示例</a></h2>
    <h3>请求示例</h3>
    <pre class="pre-box">
     请求头
        {
            "token":"token"
         }
     请求体form-data
        {
            "deviceKey":"deviceKey";
            "file":"文件";
        }
    </pre>
    <h3>正常返回示例</h3>
    <pre class="pre-box">

{

             "date": "success",
             "code": 200,
             "message": "success",
             "data": {}
}
    </pre>
    <h2><a name="API-service-add-5-5">5.5错误码</a></h2>
    <p><a href="wrong-diction.html">请参考公共错误码</a></p>


    <h1><a name="API-service-add-6">6.给设备下发url地址</a></h1>
    <h2><a name="API-service-add-6-1">6.1定义描述</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:20%">path</th><th style="width:10%">方法</th><th style="width:70%">描述</th></tr>
        <tr><td>/api/device/url</td><td>post</td><td>给设备下发url地址</td></tr>
    </table>
    <h2><a name="API-service-add-6-2">6.2请求参数</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:15%">参数</th><th style="width:10%">类型</th><th style="width:10%">必填</th><th style="width:65%">描述</th></tr>
        <tr><td>token</td><td>String</td><td>是</td><td>云端Token</td></tr>
        <tr><td>deviceKey</td><td>String</td><td>是</td><td>设备key</td></tr>
        <tr><td>url</td><td>String</td><td>是</td><td>第三方资源文件的地址</td></tr>
    </table>

    <h2><a name="API-service-add-6-3">6.3返回参数</a></h2>
    <table border="1" class="table table-striped table-bordered">
        <tr><th style="width:40%">参数</th><th style="width:20%">类型</th><th style="width:40%">描述</th></tr>
        <tr><td>token</td><td>String</td><td>云端Token</td></tr>
        <tr><td>expiresIn</td><td>long</td><td>Token有效期(单位:s)
        </td></tr>
    </table>

    <h2><a name="API-service-add-6-4">6.4示例</a></h2>
    <h3>请求示例</h3>
    <pre class="pre-box">
     请求头
        {
            "token":"token"
         }
     请求体
        {
            "deviceKey":"deviceKey";
            "url":"url";
        }
    </pre>
    <h3>正常返回示例</h3>
    <pre class="pre-box">

{

             "date": "success",
             "code": 200,
             "message": "success",
             "data": {}
}
    </pre>
    <h2><a name="API-service-add-6-5">6.5错误码</a></h2>
    <p><a href="wrong-diction.html">请参考公共错误码</a></p>


</div>
<div id="intro-platform-nav" style="position:absolute;right:100px;top:150px;width:30px;height:30px;position:fixed;z-index:1;border:1px solid #CCC;box-shadow:4px 4px 10px #E8E8E8;border-radius:10px;background:#F5F5F5	">
    <img src="img\\sanheng.png" alt="" style="width:30px;height:30px;position:fixed;position:absolute;right:0px;top:0px;">
    <div  id="nav-text" style="display:none;line-height:15px;overflow:scroll;height:280px;overflow-x:hidden;padding-left:15px;margin-top:15px">
        <p><a href="#API-service-add-1">1.云端资源服务</a></p>
        <p><a href="#API-service-add-1-1">1.1失效机制</a></p>
        <p><a href="#API-service-add-2">2.获取云端资源token</a></p>
        <p><a href="#API-service-add-2-1">2.1定义描述</a></p>
        <p><a href="#API-service-add-2-2">2.2请求参数</a></p>
        <p><a href="#API-service-add-2-3">2.3返回参数</a></p>
        <p><a href="#API-service-add-2-4">2.4示例</a></p>
        <p><a href="#API-service-add-2-5">2.5错误码</a></p>
        <p><a href="#API-service-add-3">3.刷新云端资源token</a></p>
        <p><a href="#API-service-add-3-1">3.1定义描述</a></p>
        <p><a href="#API-service-add-3-2">3.2请求参数</a></p>
        <p><a href="#API-service-add-3-3">3.3返回参数</a></p>
        <p><a href="#API-service-add-3-4">3.4示例</a></p>
        <p><a href="#API-service-add-3-5">3.5错误码</a></p>
        <p><a href="#API-service-add-4">4.给设备下发tts文本</a></p>
        <p><a href="#API-service-add-4-1">4.1定义描述</a></p>
        <p><a href="#API-service-add-4-2">4.2请求参数</a></p>
        <p><a href="#API-service-add-4-3">4.3返回参数</a></p>
        <p><a href="#API-service-add-4-4">4.4示例</a></p>
        <p><a href="#API-service-add-4-5">4.5错误码</a></p>
        <p><a href="#API-service-add-5">5.给设备下发音频文件</a></p>
        <p><a href="#API-service-add-5-1">5.1定义描述</a></p>
        <p><a href="#API-service-add-5-2">5.2请求参数</a></p>
        <p><a href="#API-service-add-5-3">5.3返回参数</a></p>
        <p><a href="#API-service-add-5-4">5.4示例</a></p>
        <p><a href="#API-service-add-5-5">5.5错误码</a></p>
        <p><a href="#API-service-add-6">6.给设备下发url地址</a></p>
        <p><a href="#API-service-add-6-1">6.1定义描述</a></p>
        <p><a href="#API-service-add-6-2">6.2请求参数</a></p>
        <p><a href="#API-service-add-6-3">6.3返回参数</a></p>
        <p><a href="#API-service-add-6-4">6.4示例</a></p>
        <p><a href="#API-service-add-6-5">6.5错误码</a></p>
    </div>
    </div>
</body>
<script src="jquery-3.3.1.min.js"></script>
<script>
    $(document).ready(function(){
      $("#intro-platform-nav").click(function(){
       $("#intro-platform-nav").animate({
            "width":"260px",
            "height":"300px"
       },600);
       $("#nav-text").css("display","");
    });
    $("#intro-platform-nav").mouseleave(function(){
      $("#intro-platform-nav").animate({
      "width":"30px",
      "height":"30px"
      },500);
      $("#nav-text").css("display","none");
    });
   })
</script>

</html>